{include file="public/head" title="支付尾款" keywords="支付尾款" description="支付尾款" /}
<style>

</style>
<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable">
    <!-- 菜单容器 -->

    <div class="mui-inner-wrap">
        <div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper" style="background-color: #fff;">
            <div class="mui-scroll">
                <header class="tx_head">
                    <p>
                        <a href="{:url('index')}" class="header_p1"><span class="mui-icon mui-icon-arrowleft"></span></a>
<<<<<<< HEAD
                    <h5>收款</h5>
=======
                    <h5>支付尾款</h5>
>>>>>>> 98b4d510f6bc858c89e59222fbe93ccf103e8629
                    </p>
                </header>
                <main class="wdzh_main">
                    <section>
                        <div>
                        <ul>
                            <li class="" style="border-bottom: 7px solid #f3f3f3;line-height: 0;height: 0.1rem;margin-top: 5px;">

                            </li>
<<<<<<< HEAD
                            <li style="height: 4rem;line-height: 4rem;background: #eee;"> <span style="color: #01cebf;margin-left: 10px;">服务名称:维修{$order.goods_name}尾款</span></li>
                            <li style="height: 4rem;line-height: 4rem;text-align: center;font-size: 20px;color: #01cebf">待付款:{$toatle}（元）</li>
                            <li style="height: 100%;line-height: 100%; text-align: center;">
                                <span id="output"></span>
                            </li>
                            <li style="text-align: center;margin-top: 3px;font-size: 16px;">客户可扫描二维码通过微信付款</li>
                            <li style="text-align: center;"><a href="{:url('Account/addweixiou',['id'=>$order['order_mun'],'xiougao'=>1])}" style="display:block;border: 1px solid #01cebf;color: #01cebf;height: 45px;line-height: 45px;width: 80%;margin-left: 10%;margin-right: 10%;border-radius: 5px">修改付款信息</a></li>
                            <li style="text-align: center;margin-top: 5px"><a href="javascript:webpay();" style="display:block;border: 1px solid #01cebf;color:#01cebf;height: 45px;line-height: 45px;width: 80%;margin-left: 10%;margin-right: 10%;border-radius: 5px">本人待付</a></li>
=======
                            <li style="height: 4rem;line-height: 4rem;background: #eee;"> <span style="color: #01cebf;margin-left: 10px;">服务名称:{$paystatus.goods_name}</span></li>
                            <li style="height: 4rem;line-height: 4rem;text-align: center;font-size: 20px;color: #01cebf">待付款:<span style="color: red">{$toatle}</span>(元)</li>
                            <li style="height: 100%;line-height: 100%; text-align: center;">
                                <span id="output"></span>
                            </li>
                            <li style="text-align: center;margin-top: 3px;font-size: 14px;">客户可扫描二维码,通过微信付款</li>
                            <li style="text-align: center;padding-top: 15px">
                                <a href="{:url('Account/editweixiou',['orderid'=>$orderid])}" style="border: 1px solid #01cebf;color: #01cebf;padding: 2px;height: 40px;line-height: 40px;width: 170px;display: block;margin-left: 30%">
                                    修改付款信息</a>
                            </li>
                            <li style="text-align: center;padding-top: 15px">
                                <a href="javascript:webpay({$orderid});" style="border: 1px solid #01cebf;color: #01cebf;padding: 2px;height: 40px;line-height: 40px;width: 170px;display: block;margin-left: 30%">
                                    本人代付</a>
                            </li>
>>>>>>> 98b4d510f6bc858c89e59222fbe93ccf103e8629
                        </ul>
                        </div>
                    </section>
                    <input type="hidden" value="{$scan}" name="userid">
                </main>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
            </div>
        </div>
        <div class="mui-off-canvas-backdrop"></div>
    </div>
</div>
{include file="public/footer"}
<script type="text/javascript" src="__STATIC__/wap/js/jquery.qrcode.min.js"></script>
</body>
<script>
    mui('body').on('tap','a',function(){
        var str = this;
        // 强制转换为字符串
        str = String(str);

    });
<<<<<<< HEAD
=======
    function jsApiCall()
    {
        WeixinJSBridge.invoke(
            'getBrandWCPayRequest',{$payRes},
            function(res){
                if(res.err_msg == "get_brand_wcpay_request:ok"){
                    window.location.href="{:url('Account/index')}";

                }else if(res.err_msg == "get_brand_wcpay_request:cancel"){

                }else{
                    alert("支付失败!");
                }
            });
    }
    function webpay(orderid) {
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{
            jsApiCall();
        }
        
    }
    
    
    
>>>>>>> 98b4d510f6bc858c89e59222fbe93ccf103e8629
    var userid=$("input[name=userid]").val();
    jQuery(function(){

        jQuery('#output').qrcode({
            width: 120,
            height: 120,
            text:userid,
        });

    })



    function jsApiCall()
    {
        WeixinJSBridge.invoke(
            'getBrandWCPayRequest',{$payRes},
            function(res){
                if(res.err_msg == "get_brand_wcpay_request:ok"){

                }else if(res.err_msg == "get_brand_wcpay_request:cancel"){

                }else{
                    alert("支付失败!");
                }
            });
    }
    function webpay(){
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{
            jsApiCall();
        }

    }

</script>
</html>